Dynomotion

Group: DynoMotion Message: 11470 From: vj Cool Date: 5/4/2015
Subject: Raspberry Pi 2 Using KMotionX
Dear All,


I am using Raspberry Pi2 to compile Par Hansson's KMotionX software. Unfortunately i am experiencing compilation error during "make"
My errors are as follows:-

Softwares/git/KMotionX/GCodeInterpreter -D_KMOTIONX -DLIB_FTDI
handler.cpp -o build/handler.o
handler.cpp:68:22: sorry, unimplemented: non-static data member initializers
handler.cpp:68:22: error: ISO C++ forbids in-class initialization of
non-const static member ‘interpreting’
handler.cpp:69:19: sorry, unimplemented: non-static data member initializers
handler.cpp:69:19: error: ISO C++ forbids in-class initialization of
non-const static member ‘last_line’
handler.cpp: In function ‘void handleUploadRequest(mg_connection*)’:
handler.cpp:597:23: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
/home/pi/Softwares/git/KMotionX/include.mk:38: recipe for target
'build/handler.o' failed
make[1]: *** [build/handler.o] Error 1
make[1]: Leaving directory
'/home/pi/Softwares/git/KMotionX/KMotionX/examples/webgui'
makefile:22: recipe for target 'subdirs' failed
make: *** [subdirs] Error 1

Please advice.

thank you 

Group: DynoMotion Message: 11478 From: Hardy Family Date: 5/5/2015
Subject: Re: Raspberry Pi 2 Using KMotionX
You have to change that to:

//state of gui.
struct state {
  int simulate;
  int feedHold;
  int interpreting; // = 0;
  int last_line; // = 0;
  char current_file[256];
  state(): interpreting(0), last_line(0) {}
};

That is, change the "=0" initializers to having a constructor which initializes the appropriate fields as shown on the last line.

The signed/unsigned warnings can usually be ignored.

If you are not really familiar with C++, then you might have some trouble with that code.  I have done some enhancements and bug fixes to Par's code, which you can find on Git Hub at https://github.com/meantaipan/KMotionX

I don't know if it will help with the Pi.  If it is "big endian" then it won't work.  Currently, the code only works on little-endian machines like Intel.  ARM processors can switch endianness, but the OS is built for one or the other.  I have a future project to get it working on the BeagleBone (and maybe the Pi) but in the meantime you might have some work to do.

Regards,
SJH


On Mon, May 4, 2015 at 5:33 PM, vj Cool vjbaskar1986@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Dear All,


I am using Raspberry Pi2 to compile Par Hansson's KMotionX software. Unfortunately i am experiencing compilation error during "make"
My errors are as follows:-

Softwares/git/KMotionX/GCodeInterpreter -D_KMOTIONX -DLIB_FTDI
handler.cpp -o build/handler.o
handler.cpp:68:22: sorry, unimplemented: non-static data member initializers
handler.cpp:68:22: error: ISO C++ forbids in-class initialization of
non-const static member ‘interpreting’
handler.cpp:69:19: sorry, unimplemented: non-static data member initializers
handler.cpp:69:19: error: ISO C++ forbids in-class initialization of
non-const static member ‘last_line’
handler.cpp: In function ‘void handleUploadRequest(mg_connection*)’:
handler.cpp:597:23: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
/home/pi/Softwares/git/KMotionX/include.mk:38: recipe for target
'build/handler.o' failed
make[1]: *** [build/handler.o] Error 1
make[1]: Leaving directory
'/home/pi/Softwares/git/KMotionX/KMotionX/examples/webgui'
makefile:22: recipe for target 'subdirs' failed
make: *** [subdirs] Error 1

Please advice.

thank you 


Group: DynoMotion Message: 11504 From: Hardy Family Date: 5/9/2015
Subject: Re: Raspberry Pi 2 Using KMotionX
I have updated the "swig" branch of KMotionX.  See https://github.com/meantaipan/KMotionX/tree/swig

At this point, KMotionServer is successfully running on the BeagleBone Black.  Also, the Python binding works on that platform, although I have not tested it much.  TCC67 works too, although again it is not extensively tested.

OK, so the BBB is not the same as the Raspberry Pi, but it's what I had on hand.  Since the Pi has an ARM CPU, the code should port without any difficulty to that platform, provided it is little-endian (which I think it usually is).  Anyway, on the Pi's command line, type 'lscpu' and it will print whether it is little- or big-endian.

I can connect (via TCP/IP) to the BBB from my Linux laptop, and run a simple CNC GUI written using the kmotion binding and pyGTK.  So now the Kflop can be connected via Ethernet, using a $50 BeagleBone as an adaptor.

Unfortunately, at this stage it is not compatible with the Windows Dynomotion code, since the client/server protocol needed to be slightly changed to support TCP/IP.  I think, though, that it should be possible to create a version of KMotionServer which would run on Windows and forward all local client connections over a TCP socket by prefixing each message with a 2-byte length.  Although it is not the most efficient approach, it would allow Ethernet/TCP to be used without Dynomotion having to make extensive changes to client programs (KMotionCNC etc.).

Enjoy!

Regards,
SJH


On Tue, May 5, 2015 at 12:50 PM, Hardy Family <hardy.woodland.cypress@...> wrote:
You have to change that to:

//state of gui.
struct state {
  int simulate;
  int feedHold;
  int interpreting; // = 0;
  int last_line; // = 0;
  char current_file[256];
  state(): interpreting(0), last_line(0) {}
};

That is, change the "=0" initializers to having a constructor which initializes the appropriate fields as shown on the last line.

The signed/unsigned warnings can usually be ignored.

If you are not really familiar with C++, then you might have some trouble with that code.  I have done some enhancements and bug fixes to Par's code, which you can find on Git Hub at https://github.com/meantaipan/KMotionX

I don't know if it will help with the Pi.  If it is "big endian" then it won't work.  Currently, the code only works on little-endian machines like Intel.  ARM processors can switch endianness, but the OS is built for one or the other.  I have a future project to get it working on the BeagleBone (and maybe the Pi) but in the meantime you might have some work to do.

Regards,
SJH


On Mon, May 4, 2015 at 5:33 PM, vj Cool vjbaskar1986@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Dear All,


I am using Raspberry Pi2 to compile Par Hansson's KMotionX software. Unfortunately i am experiencing compilation error during "make"
My errors are as follows:-

Softwares/git/KMotionX/GCodeInterpreter -D_KMOTIONX -DLIB_FTDI
handler.cpp -o build/handler.o
handler.cpp:68:22: sorry, unimplemented: non-static data member initializers
handler.cpp:68:22: error: ISO C++ forbids in-class initialization of
non-const static member ‘interpreting’
handler.cpp:69:19: sorry, unimplemented: non-static data member initializers
handler.cpp:69:19: error: ISO C++ forbids in-class initialization of
non-const static member ‘last_line’
handler.cpp: In function ‘void handleUploadRequest(mg_connection*)’:
handler.cpp:597:23: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
/home/pi/Softwares/git/KMotionX/include.mk:38: recipe for target
'build/handler.o' failed
make[1]: *** [build/handler.o] Error 1
make[1]: Leaving directory
'/home/pi/Softwares/git/KMotionX/KMotionX/examples/webgui'
makefile:22: recipe for target 'subdirs' failed
make: *** [subdirs] Error 1

Please advice.

thank you 



Group: DynoMotion Message: 11508 From: Tom Kerekes Date: 5/11/2015
Subject: Re: Raspberry Pi 2 Using KMotionX
Hi SJH,

Thanks for all your contributions!

but I get this:

Entering directory '/home/pi/git/KMotionX/KMotionX/KMotionSupport'
mkdir build
gcc  -O0 -g3 -c -fmessage-length=0 -fPIC -MMD -MP -std=c++11 -Wall -Wno-unknown-pragmas -I/home/pi/git/KMotionX/KMotionX/include/compatibility -I./include -D_KMOTIONX -DLIB_FTDI Functions.cpp -o build/Functions.o
cc1plus: error: unrecognized command line option ‘-std=c++11’

I see Par uses -std=c++0x.  I tried forcing gcc++4.8 and that solved that problem but then I get:

gcc-4.8 build/Functions.o build/HiResTimer.o build/CMutex2.o build/SocketWrapper.o -march=armv7l -pthread -shared -lstdc++ -lm -L/usr/local/lib -L/usr/lib/arm-linux-gnueabihf -L/lib/arm-linux-gnueabihf -L/home/pi/git/KMotionXmeantaipan/bin -Wl,-rpath /home/pi/git/KMotionXmeantaipan/bin -o /home/pi/git/KMotionXmeantaipan/bin/libKMotionSupport.so
gcc-4.8: error: unrecognized argument in option ‘-march=armv7l’
gcc-4.8: note: valid arguments to ‘-march=’ are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m armv8-a iwmmxt iwmmxt2 native


Can you provide any insight to this issue?  Do you know what march is appropriate for RPi2?  What Version were you using?

Thanks again

TK

PS.  Using RPi2 Raspberian and I find it much more useable than a RPi (1).  It is little endian

pi@raspberrypi ~ $ lscpu
Architecture:          armv7l
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1





Group: DynoMotion Message: 11509 From: Hardy Family Date: 5/11/2015
Subject: Re: Raspberry Pi 2 Using KMotionX
Looking at the 'configure' script in the root directory, I can see it has some specific detection for the R. Pi (at about line 128), but it is looking for the result of "uname -m" to match "armv6l".  Just for kicks, try changing that test to "armv7l".

The following setting of ARCH_C_FLAGS allows changing the options passed to gcc.  You can probably leave that as-is (since v6 code should work on v7) or you can try deleting the -march setting, since it should default as appropriate for a native build.  (Par might have been cross-compiling originally).

Obviously, my compilation on the BeagleBone happened to work because it didn't trigger that R.Pi test.  Oddly, my config.mak file ended up with -march=armv7l, and it worked.  Probably because of version differences in gcc.  On the BBB, gcc --version yields "gcc (Debian 4.6.3-14) 4.6.3" (I don't even have 4.8).

I think armv7-a is little endian, if it really insists.

Regards,
SJH


On Mon, May 11, 2015 at 11:08 AM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Hi SJH,

Thanks for all your contributions!

but I get this:

Entering directory '/home/pi/git/KMotionX/KMotionX/KMotionSupport'
mkdir build
gcc  -O0 -g3 -c -fmessage-length=0 -fPIC -MMD -MP -std=c++11 -Wall -Wno-unknown-pragmas -I/home/pi/git/KMotionX/KMotionX/include/compatibility -I./include -D_KMOTIONX -DLIB_FTDI Functions.cpp -o build/Functions.o
cc1plus: error: unrecognized command line option ‘-std=c++11’

I see Par uses -std=c++0x.  I tried forcing gcc++4.8 and that solved that problem but then I get:

gcc-4.8 build/Functions.o build/HiResTimer.o build/CMutex2.o build/SocketWrapper.o -march=armv7l -pthread -shared -lstdc++ -lm -L/usr/local/lib -L/usr/lib/arm-linux-gnueabihf -L/lib/arm-linux-gnueabihf -L/home/pi/git/KMotionXmeantaipan/bin -Wl,-rpath /home/pi/git/KMotionXmeantaipan/bin -o /home/pi/git/KMotionXmeantaipan/bin/libKMotionSupport.so
gcc-4.8: error: unrecognized argument in option ‘-march=armv7l’
gcc-4.8: note: valid arguments to ‘-march=’ are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m armv8-a iwmmxt iwmmxt2 native


Can you provide any insight to this issue?  Do you know what march is appropriate for RPi2?  What Version were you using?

Thanks again

TK

PS.  Using RPi2 Raspberian and I find it much more useable than a RPi (1).  It is little endian

pi@raspberrypi ~ $ lscpu
Architecture:          armv7l
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1





Group: DynoMotion Message: 11518 From: Hardy Family Date: 5/12/2015
Subject: Re: Raspberry Pi 2 Using KMotionX
Any advance?

Today I ordered a R.Pi (Gigabyte model) so when it gets here I will be able to update the build so it works (hopefully).

Although the BBB is a great board, it looks like development is rather stalled compared with the Pi (especially regarding 3d graphics), so I'll probably devote more development effort to the latter.  I'm looking for a good GUI toolkit that I can use from C++ and/or Python, with OpenGL-ES support, so if anyone has any suggestions in that area I'm all ears.

Regards,
SJH


On Mon, May 11, 2015 at 2:29 PM, Hardy Family <hardy.woodland.cypress@...> wrote:
Looking at the 'configure' script in the root directory, I can see it has some specific detection for the R. Pi (at about line 128), but it is looking for the result of "uname -m" to match "armv6l".  Just for kicks, try changing that test to "armv7l".

The following setting of ARCH_C_FLAGS allows changing the options passed to gcc.  You can probably leave that as-is (since v6 code should work on v7) or you can try deleting the -march setting, since it should default as appropriate for a native build.  (Par might have been cross-compiling originally).

Obviously, my compilation on the BeagleBone happened to work because it didn't trigger that R.Pi test.  Oddly, my config.mak file ended up with -march=armv7l, and it worked.  Probably because of version differences in gcc.  On the BBB, gcc --version yields "gcc (Debian 4.6.3-14) 4.6.3" (I don't even have 4.8).

I think armv7-a is little endian, if it really insists.

Regards,
SJH


On Mon, May 11, 2015 at 11:08 AM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Hi SJH,

Thanks for all your contributions!

but I get this:

Entering directory '/home/pi/git/KMotionX/KMotionX/KMotionSupport'
mkdir build
gcc  -O0 -g3 -c -fmessage-length=0 -fPIC -MMD -MP -std=c++11 -Wall -Wno-unknown-pragmas -I/home/pi/git/KMotionX/KMotionX/include/compatibility -I./include -D_KMOTIONX -DLIB_FTDI Functions.cpp -o build/Functions.o
cc1plus: error: unrecognized command line option ‘-std=c++11’

I see Par uses -std=c++0x.  I tried forcing gcc++4.8 and that solved that problem but then I get:

gcc-4.8 build/Functions.o build/HiResTimer.o build/CMutex2.o build/SocketWrapper.o -march=armv7l -pthread -shared -lstdc++ -lm -L/usr/local/lib -L/usr/lib/arm-linux-gnueabihf -L/lib/arm-linux-gnueabihf -L/home/pi/git/KMotionXmeantaipan/bin -Wl,-rpath /home/pi/git/KMotionXmeantaipan/bin -o /home/pi/git/KMotionXmeantaipan/bin/libKMotionSupport.so
gcc-4.8: error: unrecognized argument in option ‘-march=armv7l’
gcc-4.8: note: valid arguments to ‘-march=’ are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m armv8-a iwmmxt iwmmxt2 native


Can you provide any insight to this issue?  Do you know what march is appropriate for RPi2?  What Version were you using?

Thanks again

TK

PS.  Using RPi2 Raspberian and I find it much more useable than a RPi (1).  It is little endian

pi@raspberrypi ~ $ lscpu
Architecture:          armv7l
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1





Group: DynoMotion Message: 11522 From: jojodillinger Date: 5/14/2015
Subject: Re: Raspberry Pi 2 Using KMotionX
Looking forward! Would be too cool to use a Pi "only" to control the mill..:)
Group: DynoMotion Message: 11532 From: Tom Kerekes Date: 5/15/2015
Subject: Re: Raspberry Pi 2 Using KMotionX
Hi SJH,

>>>>Looking at the 'configure' script in the root directory, I can see it has some specific detection for the R. Pi (at about line 128), but it is looking for the result of "uname -m" to match "armv6l".  Just for kicks, try changing that test to "armv7l".

That seemed to work.  The root branch of Github\meantaipan compiles and communicates.

But now with the tree\swig branch I get the errors below.  I suspect wrong/missing stdio stuff?

Too many concepts in this environment for me to figure it out.  I don't even get the "big picture".  I assume the idea is to have a cnc app written in Python that could run on a remote machine and communicate through a TCP/IP socket to KMotionServer/KMotion Libs etc.  Is this correct?  I don't find any example of an App to demonstrate that.

On a side/related note I thought I would try to learn Python under MS Windows first.  In VS2013 I installed the Python Tools and that is super nice.  But I can't figure out how to access the KMotion_dotNet.dll.  Can anyone give an example of how to do that? 

Thanks
TK



make[1]: Entering directory '/home/pi/git/KMotionXmeantaipan/TCC67'
mkdir build
gcc-4.8 -march=armv6 -mfpu=vfp -mfloat-abi=hard -g -c -fmessage-length=0 -fPIC -MMD -MP -std=c++0x -Wall -Wno-unknown-pragmas -I/home/pi/git/KMotionXmeantaipan/KMotionX/include/compatibility -I/home/pi/git/KMotionXmeantaipan/KMotionX/include -I/home/pi/git/KMotionXmeantaipan/KMotionX/KMotionSupport/include -D_KMOTIONX -DLIB_FTDI tcc.cpp -o build/tcc.o
In file included from tcc.cpp:513:0:
i386-gen.c: In function ‘void gen_opi(int)’:
i386-gen.c:3164:13: warning: variable ‘opc’ set but not used [-Wunused-but-set-variable]
  int r, fr, opc;
             ^
i386-gen.c: In function ‘void gen_opf(int)’:
i386-gen.c:3531:13: warning: variable ‘fc’ set but not used [-Wunused-but-set-variable]
     int ft, fc, fr,r;
             ^
tcc.cpp: In function ‘BufferedFile* tcc_open(TCCState*, const char*)’:
tcc.cpp:1405:18: error: ‘close’ was not declared in this scope
         _close(fd);
                  ^
tcc.cpp: In function ‘void tcc_close(BufferedFile*)’:
tcc.cpp:1423:18: error: ‘close’ was not declared in this scope
     _close(bf->fd);
                  ^
tcc.cpp: In function ‘int tcc_peekc_slow(BufferedFile*)’:
tcc.cpp:1439:48: error: ‘read’ was not declared in this scope
             len = _read(bf->fd, bf->buffer, len);
                                                ^
tcc.cpp: In function ‘void preprocess(int)’:
tcc.cpp:2283:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 if ((q - buf) < sizeof(buf) - 1)
                                               ^
tcc.cpp:2511:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if ((q - buf) < sizeof(buf) - 1)
                                           ^
tcc.cpp: In function ‘int tcc_compile(TCCState*)’:
tcc.cpp:8424:39: error: ‘getcwd’ was not declared in this scope
         (void)_getcwd(buf, sizeof(buf));
                                       ^
In file included from tcc.cpp:8599:0:
tccelf.c: In function ‘void* load_data(int, long unsigned int, long unsigned int)’:
tccelf.c:1539:37: error: ‘lseek’ was not declared in this scope
     _lseek(fd, file_offset, SEEK_SET);
                                     ^
tccelf.c:1540:31: error: ‘read’ was not declared in this scope
     (void)_read(fd, data, size);
                               ^
tccelf.c: In function ‘int tcc_load_object_file(TCCState*, int, long unsigned int)’:
tccelf.c:1566:38: error: ‘read’ was not declared in this scope
     if (_read(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr))
                                      ^
tccelf.c:1663:61: error: ‘lseek’ was not declared in this scope
             _lseek(fd, file_offset + sh->sh_offset, SEEK_SET);
                                                             ^
tccelf.c:1665:38: error: ‘read’ was not declared in this scope
             (void)_read(fd, ptr, size);
                                      ^
tccelf.c: In function ‘int tcc_load_archive(TCCState*, int)’:
tccelf.c:1784:41: error: ‘read’ was not declared in this scope
     (void)_read(fd, magic, sizeof(magic));
                                         ^
tccelf.c:1804:45: error: ‘lseek’ was not declared in this scope
         file_offset = _lseek(fd, 0, SEEK_CUR);

Group: DynoMotion Message: 11533 From: Hardy Family Date: 5/15/2015
Subject: Re: Raspberry Pi 2 Using KMotionX
Hi Tom,

Those missing functions indicate that a #include <unistd.h> is missing somewhere.  I noticed that in tcc.cpp you commented out the #include of this file.  Maybe if you wrap it in #ifndef WIN32 then it might work.

Note about tcc on Linux: I tried to get it to work on 64-bit platform, but there are still some bugs there.  On a 32-bit platform, it should be OK though.  TCC assumes pointer and int are the same size, so I did a quick and dirty hack to map ints to 64 bit pointers, but there are some programs which trigger an assertion error when compiled.

More below...

On Fri, May 15, 2015 at 11:39 AM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 



Too many concepts in this environment for me to figure it out.  I don't even get the "big picture".  I assume the idea is to have a cnc app written in Python that could run on a remote machine and communicate through a TCP/IP socket to KMotionServer/KMotion Libs etc.  Is this correct?  I don't find any example of an App to demonstrate that.


That's right.  Python app could run either on the Pi, or from a remote PC (maybe for central diagnostics?).

Currently, there is no CNC app checked in to the git repo.  I am working on one, but it's currently in a local branch until it's in a bit better shape.  Still working on basic issues like getting the compiler working reliably.  The GUI part is quite nice; it has a DRO, m-code handlers and can step through g-code etc., but at present I have a few too many things on my plate and don't want to put out something half-baked yet.
 
On a side/related note I thought I would try to learn Python under MS Windows first.  In VS2013 I installed the Python Tools and that is super nice.  But I can't figure out how to access the KMotion_dotNet.dll.  Can anyone give an example of how to do that? 

Sorry, can't help too much there.  I think to access a DLL directly, you can use the Python 'ctypes' module.  It's obviously a fairly raw interface.  Don't know anything about dot net, but I would imagine there's a Python module somewhere to make it easier to access.  Hell of a learning curve...

Also you might need to set your environment correctly to allow python to find the DLLs.

Regards,
SJH

 

Thanks
TK



make[1]: Entering directory '/home/pi/git/KMotionXmeantaipan/TCC67'
mkdir build
gcc-4.8 -march=armv6 -mfpu=vfp -mfloat-abi=hard -g -c -fmessage-length=0 -fPIC -MMD -MP -std=c++0x -Wall -Wno-unknown-pragmas -I/home/pi/git/KMotionXmeantaipan/KMotionX/include/compatibility -I/home/pi/git/KMotionXmeantaipan/KMotionX/include -I/home/pi/git/KMotionXmeantaipan/KMotionX/KMotionSupport/include -D_KMOTIONX -DLIB_FTDI tcc.cpp -o build/tcc.o
In file included from tcc.cpp:513:0:
i386-gen.c: In function ‘void gen_opi(int)’:
i386-gen.c:3164:13: warning: variable ‘opc’ set but not used [-Wunused-but-set-variable]
  int r, fr, opc;
             ^
i386-gen.c: In function ‘void gen_opf(int)’:
i386-gen.c:3531:13: warning: variable ‘fc’ set but not used [-Wunused-but-set-variable]
     int ft, fc, fr,r;
             ^
tcc.cpp: In function ‘BufferedFile* tcc_open(TCCState*, const char*)’:
tcc.cpp:1405:18: error: ‘close’ was not declared in this scope
         _close(fd);
                  ^
tcc.cpp: In function ‘void tcc_close(BufferedFile*)’:
tcc.cpp:1423:18: error: ‘close’ was not declared in this scope
     _close(bf->fd);
                  ^
tcc.cpp: In function ‘int tcc_peekc_slow(BufferedFile*)’:
tcc.cpp:1439:48: error: ‘read’ was not declared in this scope
             len = _read(bf->fd, bf->buffer, len);
                                                ^
tcc.cpp: In function ‘void preprocess(int)’:
tcc.cpp:2283:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 if ((q - buf) < sizeof(buf) - 1)
                                               ^
tcc.cpp:2511:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if ((q - buf) < sizeof(buf) - 1)
                                           ^
tcc.cpp: In function ‘int tcc_compile(TCCState*)’:
tcc.cpp:8424:39: error: ‘getcwd’ was not declared in this scope
         (void)_getcwd(buf, sizeof(buf));
                                       ^
In file included from tcc.cpp:8599:0:
tccelf.c: In function ‘void* load_data(int, long unsigned int, long unsigned int)’:
tccelf.c:1539:37: error: ‘lseek’ was not declared in this scope
     _lseek(fd, file_offset, SEEK_SET);
                                     ^
tccelf.c:1540:31: error: ‘read’ was not declared in this scope
     (void)_read(fd, data, size);
                               ^
tccelf.c: In function ‘int tcc_load_object_file(TCCState*, int, long unsigned int)’:
tccelf.c:1566:38: error: ‘read’ was not declared in this scope
     if (_read(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr))
                                      ^
tccelf.c:1663:61: error: ‘lseek’ was not declared in this scope
             _lseek(fd, file_offset + sh->sh_offset, SEEK_SET);
                                                             ^
tccelf.c:1665:38: error: ‘read’ was not declared in this scope
             (void)_read(fd, ptr, size);
                                      ^
tccelf.c: In function ‘int tcc_load_archive(TCCState*, int)’:
tccelf.c:1784:41: error: ‘read’ was not declared in this scope
     (void)_read(fd, magic, sizeof(magic));
                                         ^
tccelf.c:1804:45: error: ‘lseek’ was not declared in this scope
         file_offset = _lseek(fd, 0, SEEK_CUR);

Group: DynoMotion Message: 11541 From: par.hansson80 Date: 5/20/2015
Subject: Re: Raspberry Pi 2 Using KMotionX
Hi 

I have made some changes in both code and configure scripts. 
gcc-4.8 is default for RPi2 as well. This works for me. 

Please pull the latest and run configure before make.

There are also lots of changes in the web gui.

/Pär